/*
 * $Id: Schema.java 56 2009-05-11 10:11:46Z donbeave $
 */

package labour.dbmanager.client.model;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

@SuppressWarnings("serial")
public class Schema extends DataBaseItem<Schema> {

  public Schema() {
    set("tablesCount", 0);
  }

  public int getTablesCount() {
    return get("tablesCount");
  }

  public boolean hasTables() {
    if (getTablesCount() > 0) {
      return true;
    }
    return false;
  }

  public void getTables(AsyncCallback<List<Table>> callback) {
    connector().getTables(this, callback);
  }

  public void onSave(AsyncCallback<Schema> callback) {

  }

  public void onUpdate(AsyncCallback<Schema> callback) {

  }

  public void onRemove(AsyncCallback<Schema> callback) {

  }

}
